package com.credit.util;

import java.util.Date;

import javax.servlet.http.HttpServletRequest;

import com.credit.context.CreditServletContext;
import com.credit.entity.CreditLoanLog;
import com.credit.service.CreditLoanLogService;

public class LoanLogUtil {
	
	public static void addLoanLog(Long loanId,Long userId, String desc,Integer processFlag,Integer processStatus,int appType) {
		HttpServletRequest request = CreditServletContext.getRequest();
		CreditLoanLogService creditLoanLogService = (CreditLoanLogService) ApplicationContextUtils.getBean("creditLoanLogService");
		CreditLoanLog loanLog = new CreditLoanLog();
		loanLog.setCreateTime(new Date());
		loanLog.setDescrible(desc);
		loanLog.setLoanId(loanId);
		loanLog.setProcessFlag(processFlag);
		loanLog.setProcessStatus(processStatus);
		loanLog.setUserId(userId);
		loanLog.setAppType(appType);
		
		creditLoanLogService.addLoanLog(loanLog);
		
	}

}
